public class RegionProjectileAtThing extends Codex {
private static final int TIMER_ID_INACTIVE = 1;
private static final int TIMER_ID_MULTIPLE = 2;
private CodexThing _emitter;
private CodexThing _targetObject;
private String _templateName;
private int _numProjectiles;
private int _numTimesToFire;
private float _delayBetween;
private int _scatter;
private float _delayInactive;
// $FF: renamed from: i int
private int field_0;
private boolean bActive;
private float[] offset;
public static String[] _params = new String[]{"Emitter thing", "Target object", "Template to fire", "Number of projectiles;1", "Number of times to fire (0 is unlimited);0", "Delay in between;0.0", "Scatter;0", "Delay Inactive;5.0"};
public void restore(int flags) {
this.field_0 = CodexSequence.RestoreInt();
}
public void entered(int guid, int causeGUID, int captureID) {
if (!this.bActive) {
if (Codex.IsActorGuid(causeGUID)) {
if (this._numTimesToFire != 0) {
if (this.field_0 >= this._numTimesToFire) {
return;
}
this.FireProjectile();
++this.field_0;
} else {
this.FireProjectile();
}
}
}
}
public RegionProjectileAtThing(CodexThing emitter, CodexThing targetObject, String templateName, int numProjectiles, int numTimesToFire, float delayBetween, int scatter, float delayInactive) {
this._emitter = new CodexThing(((Codex)emitter).GetGUID());
this._targetObject = new CodexThing(((Codex)targetObject).GetGUID());